import json
import os
import shutil

sets1 = set()

with open("./AN_big.txt", "r", encoding="utf-8") as f:
    for fLine in f:
        line = fLine.strip()
        sets1.add(line)

with open("./AN_excel_json.txt", "r", encoding="utf-8") as f:
    line = f.read()
    dicts = json.loads(line)
    num = 0
    outpath = r"D:\xujiang\download\EI\download\excel2"
    for key in dicts:
        values = set(dicts[key])
        temp = values.difference(sets1)
        if temp:
            num = num + 1
            print(num)
        else:
            path = r'D:\xujiang\download\EI\download\excel'
            filepath = os.path.join(path, key)
            print(filepath)
            shutil.move(filepath, outpath)
